#include "digital_tube.h"

void digital_tube_test(void *args)
{
    uint8_t i = 0;
    uint32_t tick = HAL_GetTick();
    digital_tube_init();
    for (;;)
    {
        digital_tube_set_bit((uint8_t)i / 10, SMG_BIT_1);
        HAL_Delay(10);
        digital_tube_set_bit((uint8_t)i % 10, SMG_BIT_2);
        HAL_Delay(10);
        if (HAL_GetTick() - tick >= 1000)
        {
            tick = HAL_GetTick();
            if (i++ >= 100)
                i = 0;
        }
    }
}